public class PracticeMan{
	String name;
	int age;


	public void act(){
		System.out.println("beautiful man");



	}

	}
	class p2 extends PracticeMan{
		public p2(String name,int age){
			this.name=name;
			this.age=age;

		}
		public void act(){//方法的重写
			System.out.println(name+"could rap and play basketball");




		}
	}
	 class p1 extends PracticeMan {
	public p1(String name,int age){
		this.name=name;
		this.age=age;

		 }

		 public void act(){//方法的重写
			 System.out.println(name+"could sing and dance");




		 }



	public static void main(String[] args) {
	PracticeMan cai=new p1("caixukun",20);
	cai.act();//p1对象来调用
		cai=new p2("caixukun",20);
		cai.act();




	}
}
